<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>MeteoCal - Create Event</title>
	<link rel="stylesheet" type="text/css" href="${request.contextPath}/resources/css/main.css" />
    </h:head>
    <h:body>
        <p:layout fullPage="true">
            <p:layoutUnit position="north" size="60" resizable="false" closable="false" collapsible="false">
		<ui:include src="/includes/header.xhtml"/>
            </p:layoutUnit>
	    <p:layoutUnit position="center" class="content">
		<h1>Create Event</h1>
		<h:form>
		    <h:panelGrid columns="2">
			<p:outputLabel value="Event name:" for="eventName" />
			<p:inputText id="eventName" value="#{eventController.selected.eventName}" title="eventName" />
			
			<p:outputLabel value="Date:" for="eventDate" />
                        <p:calendar id="eventDate" value="#{eventController.selected.eventDate}" showOn="button" pattern="yyyy-MM-dd" />
			
			<p:outputLabel value="Start time:" for="eventStartTime" />
                        <p:calendar id="eventStartTime" value="#{eventController.selected.eventStartTime}" pattern="HH:mm:ss" timeOnly="true"  />
			
			<p:outputLabel value="End time:" for="eventEndTime" />
                        <p:calendar id="eventEndTime" value="#{eventController.selected.eventEndTime}" pattern="HH:mm:ss" timeOnly="true"  />
			
			<p:outputLabel value="City:" for="eventCity" />
                        <p:inputText id="eventCity" value="#{eventController.selected.eventCity}" title="#{bundle.EditEventTitle_eventCity}" />
			
			<p:outputLabel value="Outdoor event:" for="eventIndoorOutdoor" />
                        <p:selectBooleanCheckbox value="#{eventController.selected.eventIndoorOutdoor}" id="eventIndoorOutdoor" />
			
			<p:outputLabel value="Public event:" for="eventPublicPrivate" />
                        <p:selectBooleanCheckbox value="#{eventController.selected.eventPublicPrivate}" id="eventPublicPrivate" />
			
			<p:outputLabel value="Description:" for="eventDesciption" />
                        <p:inputTextarea value="#{eventController.selected.eventDesciption}" cols="100" rows="10" id="eventDesciption" title="#{bundle.EditEventTitle_eventDesciption}" />
			
 <!--                       <h:outputLabel value="#{bundle.CreateEventLabel_userEmail}" for="userEmail" />
                        <p:inputText id="userEmailEmail" value="#{userController.loginUser}" title="#{bundle.EditEventTitle_eventCity}" />

                        <h:selectOneMenu id="userEmail" value="#{eventController.selected.userEmail}" title="#{bundle.CreateEventTitle_userEmail}" required="true" requiredMessage="#{bundle.CreateEventRequiredMessage_userEmail}">
                            <f:selectItems value="#{userController.itemsAvailableSelectOne}"/>
                        </h:selectOneMenu>-->
                        
                        <p:commandButton type="submit" value="Create event" action="#{eventController.eventCreate}" ajax="false" />
		    </h:panelGrid>

<!--                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventID}" for="eventID" />
                    <h:inputText id="eventID" value="#{eventController.selected.eventID}" title="#{bundle.CreateEventTitle_eventID}" required="true" requiredMessage="#{bundle.CreateEventRequiredMessage_eventID}"/>
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventName}" for="eventName" />
                    <h:inputText id="eventName" value="#{eventController.selected.eventName}" title="#{bundle.CreateEventTitle_eventName}" />
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventDesciption}" for="eventDesciption" />
                    <h:inputText id="eventDesciption" value="#{eventController.selected.eventDesciption}" title="#{bundle.CreateEventTitle_eventDesciption}" />
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventDate}" for="eventDate" />
                    <h:inputText id="eventDate" value="#{eventController.selected.eventDate}" title="#{bundle.CreateEventTitle_eventDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventStartTime}" for="eventStartTime" />
                    <h:inputText id="eventStartTime" value="#{eventController.selected.eventStartTime}" title="#{bundle.CreateEventTitle_eventStartTime}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventEndTime}" for="eventEndTime" />
                    <h:inputText id="eventEndTime" value="#{eventController.selected.eventEndTime}" title="#{bundle.CreateEventTitle_eventEndTime}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventCity}" for="eventCity" />
                    <h:inputText id="eventCity" value="#{eventController.selected.eventCity}" title="#{bundle.CreateEventTitle_eventCity}" />
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventIndoorOutdoor}" for="eventIndoorOutdoor" />
                    <h:inputText id="eventIndoorOutdoor" value="#{eventController.selected.eventIndoorOutdoor}" title="#{bundle.CreateEventTitle_eventIndoorOutdoor}" />
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventPublicPrivate}" for="eventPublicPrivate" />
                    <h:inputText id="eventPublicPrivate" value="#{eventController.selected.eventPublicPrivate}" title="#{bundle.CreateEventTitle_eventPublicPrivate}" />
                    <h:outputLabel value="#{bundle.CreateEventLabel_eventNotification}" for="eventNotification" />
                    <h:inputText id="eventNotification" value="#{eventController.selected.eventNotification}" title="#{bundle.CreateEventTitle_eventNotification}" />
                    <h:outputLabel value="#{bundle.CreateEventLabel_userEmail}" for="userEmail" />
                    <h:selectOneMenu id="userEmail" value="#{eventController.selected.userEmail}" title="#{bundle.CreateEventTitle_userEmail}" required="true" requiredMessage="#{bundle.CreateEventRequiredMessage_userEmail}">
                        <f:selectItems value="#{userController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>-->


		</h:form>
	    </p:layoutUnit>
	    <p:layoutUnit position="south" size="80" resizable="false" closable="false" collapsible="false">
		<ui:include src="/includes/footer.xhtml"/>
	    </p:layoutUnit>
        </p:layout>
    </h:body>
</html>

